<?php
/**
 * Created by PhpStorm.
 * User: leo
 * Date: 2018/5/21
 * Time: 20:26
 */
include '../classes/logincheck.php';
include '../classes/conn.php';
if(islogin()!='teacher_login') {
    die("error");
}

$leavemsg=$_POST['leavemsg'];
$detail=$_POST['detail'];
$time=date('Y-m-d H:i:s');

$query="insert into reply (leavemessage, detail, time) values ('{$leavemsg}','{$detail}','{$time}')";
$res=mysql_query($query);
if($res){
    echo '1';
}
else echo '0';